<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="cache-control" content="no-cache">
<title>Genivia - Miscellaneous functions</title>
<link href="genivia_tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="genivia_content.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="top">
 <div id="titlearea">
  <table height="72px" width="100%" cellspacing="0" cellpadding="0">
   <tbody>
    <tr>
     <td width="10%">&nbsp;</td>
     <td width="175px"><a href="https://www.genivia.com"><img alt="Genivia" src="GeniviaLogo2_trans_noslogan.png"/></a></td>
     <td class="tab_home"><a href="https://www.genivia.com">Home</a></td>
     <td class="tab_home"><a href="https://www.genivia.com/docs.html">Documentation</a></td>
     <td>
      <div style="float: right; font-size: 18px; font-weight: bold;">Miscellaneous functions</div>
      <br>
      <div style="float: right; font-size: 10px;">updated Thu Dec 23 2021 by Robert van Engelen</div>
     </td>
     <td width="10%">&nbsp;</td>
    </tr>
   </tbody>
  </table>
 </div>
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__misc.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Miscellaneous functions</div>  </div>
</div><!--header-->
<div class="contents">

<p>This module defines other useful functions.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga54e5c38507960996937fb31719f7113e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__misc.html#ga54e5c38507960996937fb31719f7113e">soap_begin</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>)</td></tr>
<tr class="memdesc:ga54e5c38507960996937fb31719f7113e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset context.  <a href="#ga54e5c38507960996937fb31719f7113e">More...</a><br /></td></tr>
<tr class="separator:ga54e5c38507960996937fb31719f7113e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5fcf3c8f6f4bc6d5e6efd7a92ceaf399"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__misc.html#ga5fcf3c8f6f4bc6d5e6efd7a92ceaf399">soap_rand_uuid</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, const char *prefix)</td></tr>
<tr class="memdesc:ga5fcf3c8f6f4bc6d5e6efd7a92ceaf399"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a randomized unique UUID string.  <a href="#ga5fcf3c8f6f4bc6d5e6efd7a92ceaf399">More...</a><br /></td></tr>
<tr class="separator:ga5fcf3c8f6f4bc6d5e6efd7a92ceaf399"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae2bfad49979faa3a625aca44acaa017c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__misc.html#gae2bfad49979faa3a625aca44acaa017c">soap_tag_cmp</a> (const char *string, const char *pattern)</td></tr>
<tr class="memdesc:gae2bfad49979faa3a625aca44acaa017c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare string to a pattern.  <a href="#gae2bfad49979faa3a625aca44acaa017c">More...</a><br /></td></tr>
<tr class="separator:gae2bfad49979faa3a625aca44acaa017c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga91a35d2f67eeea8dc31fd23a3cea65d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__misc.html#ga91a35d2f67eeea8dc31fd23a3cea65d4">soap_match_tag</a> (struct <a class="el" href="structsoap.html">soap</a> *<a class="el" href="structsoap.html">soap</a>, const char *tag1, const char *tag2)</td></tr>
<tr class="memdesc:ga91a35d2f67eeea8dc31fd23a3cea65d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Match an XML tag name.  <a href="#ga91a35d2f67eeea8dc31fd23a3cea65d4">More...</a><br /></td></tr>
<tr class="separator:ga91a35d2f67eeea8dc31fd23a3cea65d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This module defines other useful functions. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga54e5c38507960996937fb31719f7113e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void soap_begin </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reset context. </p>
<p>This function resets the context to start serialization with the <code>serialize</code> functions. Alternatively, <code><a class="el" href="group__group__io.html#ga9c251be717c7c4044dac7a79ecd6163a" title="Initialize the context for sending. ">soap_begin_send</a></code> can be used before calling the <code>serialize</code> functions, but this is sometimes not possible so this function can be used instead.</p>
<dl class="section user"><dt>Example:</dt><dd></dd></dl>
<div class="fragment"><div class="line"><span class="keyword">struct </span>soap *soap = <a class="code" href="group__group__context.html#ga51cde138234ed7ec8c4e25bdf6418658">soap_new1</a>(<a class="code" href="group__group__flags.html#gaf3ce7bc1679e665ac6b23da56510f645">SOAP_XML_GRAPH</a>);</div><div class="line">... <span class="comment">// further initializations</span></div><div class="line"><span class="keyword">struct </span>ns__someElement elt;</div><div class="line">... <span class="comment">// populate elt</span></div><div class="line"><a class="code" href="group__group__misc.html#ga54e5c38507960996937fb31719f7113e">soap_begin</a>(soap); <span class="comment">// reset context before calling serialize functions</span></div><div class="line">soap_serialize_ns__someElement(soap, &amp;elt); <span class="comment">// analyze pointers for multi-ref serialization</span></div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><code><a class="el" href="group__group__io.html#ga9c251be717c7c4044dac7a79ecd6163a" title="Initialize the context for sending. ">soap_begin_send</a></code>. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga91a35d2f67eeea8dc31fd23a3cea65d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int soap_match_tag </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>tag1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>tag2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Match an XML tag name. </p>
<p>This function returns <code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> when the two specified XML tag names match. The first tag name is a qualified or unqualified parsed tag name when the parser is pulling XML tags. The second tag name is an unqualified or namespace-normalized qualified tag name or pattern to match. A namespace-normalized qualified tag name uses a prefix defined in the <code><a class="el" href="group__group__namespace.html#gaabfac0a3b8d38498bc5e1e3bc465ead6" title="The global XML namespaces table with entries defined by the Namespace structure and populated in an ...">namespaces</a></code> table. A pattern consists of two types of wildcard meta-characters: <code>*</code> matches any text of any length and <code>-</code> matches any single character. Returns <code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> when the tags are matching or <code><a class="el" href="group__group__errors.html#ga7f4d934410ea4dd2ffa5ad7fcaae7e70" title="A soap_status error code: XML element tag parsed does not match anything that is expected. ">SOAP_TAG_MISMATCH</a></code> when the tags are non-matching.</p>
<dl class="section warning"><dt>Warning</dt><dd>This function should only be used while the XML parser is actively parsing input, for example in the <code><a class="el" href="group__group__callbacks.html#ga0c2e1a0b5a5197128af1acc48662b1bd" title="Callback to catch unrecognized XML elements and overrides SOAP_XML_STRICT validation errors for these...">soap::fignore</a></code> callback.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd><code><a class="el" href="group__group__errors.html#ga3b10a68f354f39cbb0fe0d043ad4c7c0" title="The soap_status code for no error (zero) ">SOAP_OK</a></code> (match) or <code><a class="el" href="group__group__errors.html#ga7f4d934410ea4dd2ffa5ad7fcaae7e70" title="A soap_status error code: XML element tag parsed does not match anything that is expected. ">SOAP_TAG_MISMATCH</a></code> (no match) </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
    <tr><td class="paramname">tag1</td><td>parsed (un)qualified tag name string to match </td></tr>
    <tr><td class="paramname">tag2</td><td>(namespace-normalized qualified) tag name string or pattern to match </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga5fcf3c8f6f4bc6d5e6efd7a92ceaf399"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* soap_rand_uuid </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structsoap.html">soap</a> *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>prefix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a randomized unique UUID string. </p>
<p>This function returns a randomized unique UUID string stored in a temporary buffer. The UUID string starts with the specified prefix if non-NULL.</p>
<dl class="section user"><dt>Example:</dt><dd></dd></dl>
<div class="fragment"><div class="line"><span class="keyword">struct </span>soap *soap = <a class="code" href="group__group__context.html#ga87c20488b2dc680aaa7689b1d024989c">soap_new</a>();</div><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> *uuid = <a class="code" href="group__group__context.html#ga41747ef145667bdff9c66cdd2bc86653">soap_strdup</a>(soap, <a class="code" href="group__group__misc.html#ga5fcf3c8f6f4bc6d5e6efd7a92ceaf399">soap_rand_uuid</a>(soap, NULL));</div><div class="line">...</div></div><!-- fragment --><dl class="section return"><dt>Returns</dt><dd>randomized UUID string stored in a temporary buffer </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td><code><a class="el" href="structsoap.html" title="Context with the engine state. ">soap</a></code> context </td></tr>
    <tr><td class="paramname">prefix</td><td>prefix string or NULL </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae2bfad49979faa3a625aca44acaa017c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int soap_tag_cmp </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>string</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pattern</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compare string to a pattern. </p>
<p>This function returns zero when the specified string matches the given pattern, nonzero otherwise. A pattern consists of two types of wildcard meta-characters: <code>*</code> matches any text of any length and <code>-</code> matches any single character. This function is commonly used to match XML tags and XML namespace URIs, such as the URI pattern in the third column of the <code><a class="el" href="group__group__namespace.html#gaabfac0a3b8d38498bc5e1e3bc465ead6" title="The global XML namespaces table with entries defined by the Namespace structure and populated in an ...">namespaces</a></code> table.</p><dl class="section return"><dt>Returns</dt><dd>zero (match) or nonzero (no match) </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td>string to match </td></tr>
    <tr><td class="paramname">pattern</td><td>pattern to match </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<hr class="footer">
<address class="footer">
Copyright (C) 2021, Robert van Engelen, Genivia Inc., All Rights Reserved.
</address>
<address class="footer"><small>
Converted on Thu Dec 23 2021 13:46:46 by <a target="_blank" href="http://www.doxygen.org/index.html">Doxygen</a> 1.8.11</small></address>
<br>
<div style="height: 246px; background: #DBDBDB;">
</body>
</html>
